package ma.ensao.evalmetrics.controller.metrics;

import java.io.File;
import java.io.IOException;

import ma.ensao.evalmetrics.model.NPM;
import ma.ensao.evalmetrics.util.javaProjects.NPMMetric;

/*
* Calcule 
* NPM represente la moyenne des methodes publiques (Public) par rapport a tous les methodes du systeme.
*/

public class NPMManager {
	private NPM npm=new NPM();
	double nmbre;
	private int nbMethods=0;
	
	public NPM read(File file) throws IOException {
		    NPMMetric mM = new NPMMetric(file);
		    setNmbre(mM.getNpm());
		    this.setNbMethods(mM.getNbMethods());
		    npm.setNmbre(getNmbre());
		    npm.setNbMethods(getNbMethods());
			return npm;
	}
	public NPM getNpm() {
		return npm;
	}
	public void setNpm(NPM npm) {
		this.npm = npm;
	}
	public double getNmbre() {
		return nmbre;
	}
	public void setNmbre(double nmbre) {
		this.nmbre = nmbre;
	}
	public int getNbMethods() {
		return nbMethods;
	}
	public void setNbMethods(int nbMethods) {
		this.nbMethods = nbMethods;
	}
}